Personal Science Daily Notes

The best is the enemy of the good

I used to keep a lengthy spreadsheet where I carefully tracked all my food, sleep times, and more. Some of that can be automated — for example, my Apple Watch knows about sleep and exercise — but it’s a real hassle to keep it up and in the right format.

Plus, over the years I’ve learned that I rarely use that carefully-collected data for anything really useful. Who cares how much of this-or-that food I eat, unless I’m trying to rigorously follow a new diet?

But tracking some information, I find, is useful. For example, I’ve noticed that some mornings for no particular reason I’ll wake up with a very mild headache that seems to disappear within an hour or two. This happens infrequently enough, and is mild enough that it’s not worth it for me to go all-in quantified self and laboriously record every last thing I did in hopes of finding the trigger.

Instead, for the past few years I’ve simply kept a running text file with very rough notes about what I did that day. If I miss a day, or forget to track something — no big deal. But on those rare mornings with headaches, I’ll make a special effort to write as many details as possible. Then, I simply search for ‘headache’ to see if I can recognize any patterns from the previous episodes.

That’s a simple system that requires far less effort than some of the alternatives. But the best would be if somehow I could combine the simplicity of my basic notes with the power of a spreadsheet or structured database. Then I can make all the fancy calculations about average hours of sleep per night, correlation statistics, and more.

This is a great project for ChatGPT.


More info

My meals are pretty consistent anyway, and I don’t even bother tracking the background stuff that I do all the time (e.g. coffee drinking). Mostly I’ll just note items in general terms and that’ll be enough for me to fill in the details later. For example, if I say “eggs” for breakfast, I know that most of the time for me it’s actually two eggs, fried in olive oil.

Original File

For example, here’s a snippet from two days worth of notes:

A simple text file that shows the basics of each day. Note that the file is in reverse chronological order

Prompt

This is my prompt to convert that jumbled text into something useful:


I have a text file containing self-tracking data about sleep,  food intake, and other health observations.

Please help me extract this information and generate a CSV file with the following columns: 

date, bedtime, Number of Wakeups, Rise time, Total Sleep (hours), Food Summary, Other

Please ensure the CSV format is correct and consider the following:

- Ignore any markdown headings or section titles within the text file
- If information is missing or ambiguous, make a best guess or leave the cell blank
- Prioritize extracting information directly from the text, but use calculations or estimations when necessary.
- Ensure the "Food Summary" and "Other" columns do not contain commas to avoid disrupting the CSV format.

Example Text Data: 


**2024-05-08 7:15 AM** Monday

Asleep 10:30 - 6:45 with 2 wakeups (pee). 

breakfast: eggs, bacon

lunch: leftover chicken salad

dinner: salmon, asparagus

Output

And here’s the output as a perfectly usable CSV file.

Analysis

All this data does no good if it doesn’t help answer my questions. I ran it through ChatGPT using this prompt:


This is a spreadsheet containing various health-related summaries of my diet and sleep over the past few months. I'd like to know any possible food types, sleep amounts, or other variables that might correlate with the number of wakeups per night.

and it suggested the following as possibly correlated with the number of wakeups per night.

  • Eggs (5 mentions)
  • Cheese (6 mentions)
  • Bread (5 mentions)

Recommendations

But what about the headaches? When I ran this spreadsheet through Google Gemini, it suggested:

Google Gemini Suggestions

High-Fat Foods: Several instances involve the consumption of high-fat foods like cheese, pizza, bacon, and red meat the day before a headache. While healthy fats are important, excessive intake might contribute to headaches in some individuals.

Processed Foods: Processed meats, snacks like tortilla chips, and sugary treats like apple pie appear on some headache-preceding days. These foods can contain additives and preservatives that may trigger headaches in sensitive individuals. Alcohol: Alcohol is a known trigger for headaches and is mentioned before two headache instances.

I don’t have enough data points yet to really say I’ve found a correlation, but these are some great ideas I hadn’t previously considered. Often with personal science, that’s the real goal anyway.